<!DOCTYPE html>
<html lang="en"     xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:th="http://www.thymeleaf.org"
                    xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>登录成功，MyBro</h1>
<!-- 获取当前用户信息-->
<span> <shiro:principal/></span>
<br>
<span shiro:hasPermission="ROLE_ADMIN">没有权限是看不这里的</span>
<br>
<span>没有权限是看不到上面的</span>
<br>
<div th:if="${session.loginUser == null}" >
    <span>登录</span>
</div>
<div th:if="${session.loginUser != null}">
    <span th:text="${session.loginUser}"></span>
</div>
</body>
</html>